<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/21 0021
 * Time: 17:06
 */
use yii\helpers\Html;
use yii\helpers\Url;
?>
<div class="col-md-2">
    <div class="list-group">
        <?php
        $items = [
            [
                'title' => '人员',
                'url' => ['/agent/index'],
            ],
            [
                'title' => '轮播图管理',
                'url' => ['/carousel/index'],
            ],
            [
                'title' => '资讯管理',
                'url' => ['/information/index'],
            ],
            [
                'title' => '代理人员API',
                'url' => ['/api/agent'],
            ],
            [
                'title' => '资讯API',
                'url' => ['/api/information'],
            ],
            [
                'title' => '资讯详情内容API',
                'url' => ['/api/informationcontent'],
            ],
            [
                'title' => '轮播API',
                'url' => ['/api/carousel'],
            ],


        ];

        foreach ($items as $item) {
            echo Html::a($item['title'], $item['url'], [
                'class' => 'list-group-item ' . ('/' . $this->context->route === Url::to($item['url']) ? ' active ' : ''),
            ]);
        }

        ?>
    </div>
</div>
